﻿using System;
using System.Collections.Generic;
using System.Reflection;

namespace xycn.framework.ControllerManagement
{
    /// <summary>
    /// controller调用参数和路由中参数对应关系
    /// </summary>
    public class InvokeParameter
    {
        /// <summary>
        /// Http请求处理函数输入参数
        /// </summary>
        public Type invokeParameters = null;
        public string parameterName = "";
    }

    /// <summary>
    /// controller插件方法绑定类
    /// </summary>
    public class BindControllerMethod
    {
        /// <summary>
        /// 对应请求方法
        /// </summary>
        //public controller.HttpMethod httpMethod = controller.HttpMethod.HttpGet;

        /// <summary>
        /// 库文件名称
        /// </summary>
        public string libName = "";

        /// <summary>
        /// 对应controller类信息
        /// </summary>
        public Type controllerType = null;

        /// <summary>
        /// controller基本路由
        /// </summary>
        public string baseRoute = "";

        /// <summary>
        /// 
        /// </summary>
        public string methodRoute = "";

        /// <summary>
        /// 指明方法路由是否为绝对路径
        /// </summary>
        public bool isMethodRouteAbsolute = false;
        /// <summary>
        /// Http请求处理函数
        /// </summary>
        public MethodInfo methodInfo = null;

        /// <summary>
        /// Http请求处理函数输入参数
        /// </summary>
        public List<InvokeParameter> invokeParemeters = new List<InvokeParameter>();

    }
}
